package com.example.yjj_java_web_homework3.repository;

import com.example.yjj_java_web_homework3.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @author Li Chun Hei
 * @date 4/11/2025
 * @description
 */
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    Optional<User> findByUsername(String username);
    boolean existsByUsername(String username);
}
